package com.service;

import java.util.List;

import com.bean.PurchaseOrder;
import com.bean.PurchaseOrderMaterial;

/**
 * @author author : 张鹏
 * @date createTime：2018年1月25日 下午5:32:15
 * @Description: 该类的功能描述
 */
public interface PurchaseOrderService {
	public List<PurchaseOrder> selectAll();

	public PurchaseOrder selectByPrimaryKey(int id);

	/**
	 * 根据状态码查询
	 * 
	 * @param state
	 * @return
	 */
	public List<PurchaseOrder> selectByState(int state);
	
	public List<PurchaseOrder> selectBySupplierId(int supplierId);
	
	public List<PurchaseOrder> selectByStateAndSupplierId(PurchaseOrder p);

	public List<PurchaseOrder> selectByFinish(int finish);

	public int insert(PurchaseOrder p);

	public int deleteByPrimaryKey(int id);

	public int exame(PurchaseOrder p);

	/**
	 * 供应商发货
	 * 
	 * @param p
	 * @return
	 */
	public int sendMaterial(PurchaseOrder p);

	/**
	 * 采购员确认收货
	 * 
	 * @param p
	 * @return
	 */
	public int receiveMaterial(PurchaseOrder p);

	List<PurchaseOrderMaterial> getSumMaterialQuantity();
}
